package com.consumer.controller;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.dubbo.demo.api.service.DemoService;

@RestController
public class TestController {

	@Reference(version = "1.0.0")
	private DemoService demoService;
	
	@RequestMapping(value = "/getTest", method = RequestMethod.GET)
	public String getTest() {
		String str = demoService.getTest();
		return str;
	}
	
	@RequestMapping(value = "/getTest2", method = RequestMethod.GET)
	public String getTest2(String name) {
		String str = demoService.showName(name);
		return str;
	}
}
